cmake_minimum_required(VERSION 3.10)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_CUDA_ARCHITECTURES 70;75;86;89)

project(fnnblas LANGUAGES CXX CUDA)

file(GLOB_RECURSE ALL_CPP_SOURCES src/*.cpp)
# # 要排除的目录路径
# set(EXCLUDE_DIR "src")
# # 在所有cpp文件中排除指定目录中的文件
# foreach(SOURCE ${ALL_CPP_SOURCES})
#     string(FIND ${SOURCE} ${EXCLUDE_DIR} EXCLUDE_DIR_FOUND)
#     if(EXCLUDE_DIR_FOUND EQUAL -1)
#         list(APPEND CPP_SOURCES ${SOURCE})
#     endif()
# endforeach()


add_executable(testTensorNew test/testTensorNew.cpp)
target_sources(testTensorNew PUBLIC ${ALL_CPP_SOURCES})
target_include_directories(testTensorNew PRIVATE include) # after pybind11_add_module

add_executable(testTensorDot test/testTensorDot.cpp)
target_sources(testTensorDot PUBLIC ${ALL_CPP_SOURCES})
target_include_directories(testTensorDot PRIVATE include) # after pybind11_add_module
